package kr.co.doriclassic.dataEx;

public class TestBinary {
	public static void main(String[] args) {
		int[] arr = {3,4,5,7,1,2,6};
		BinarySearch b = new BinarySearch(arr);
		b.prnArr(arr);
		//선정렬
		b.arraySort(arr);
		b.prnArr(arr);		
		//int r = b.binarySearch(arr, 0, 6, 3);
		int r = b.binarySearch(arr, 0, 6, 9);
		System.out.println();
		if(r>0)
			System.out.println("숫자 3은 "+r+"번째 있다.");
		else 
			System.out.println("찾을 수 없습니다.");
	}
}
